package com.yxs.shopping;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;

@SpringBootApplication
@EnableFeignClients(basePackages = "com.yxs.test.feign")
// 直接用@ComponentScan不行（App本身的controller都找不到了），要@ComponentScans包它，可能和bean创建顺序有关
//@ComponentScan("com.yxs.test.feign")
@ComponentScans(
    {
    @ComponentScan("com.yxs.test.feign")
//        @ComponentScan("com.yxs.shopping")
    }
)
@EnableCircuitBreaker
public class ShoppingApp {
    public static void main(String[] args) {
        SpringApplication.run(ShoppingApp.class, args);
    }
}
